package com.dddd.blog.api.post.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author dddd
 * @since 2022-02-27
 */
@TableName("bms_post")
@ApiModel(value = "Post对象")
@Data
public class Post implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("作者id")
    private Long authorId;

    @ApiModelProperty("作者名称")
    private String authorName;

    @ApiModelProperty("文章标题")
    private String title;

    @ApiModelProperty("文章简介")
    private String summary;

    @ApiModelProperty("文章内容")
    private String content;

    @ApiModelProperty("标签id")
    private String tags;

    @ApiModelProperty("分类id")
    private String category;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty("修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty("状态")
    private Integer status;

    @ApiModelProperty("标题图片链接")
    private String iconLink;

    @ApiModelProperty("管理员id")
    private Long adminId;

    @ApiModelProperty("是否公开")
    private Integer isPublic;

    @ApiModelProperty("是否原创")
    private Integer isOriginal;

    @ApiModelProperty("是否开启评论")
    private Integer isOpenComment;

    @ApiModelProperty("文章来源,0后台，1投稿")
    private Integer postSource;

    @ApiModelProperty("序列号")
    private String uuid;

    @ApiModelProperty("阅读数")
    private Integer readCount;

    @ApiModelProperty("评论数")
    private Integer commentCount;

    @ApiModelProperty("链接")
    private String link;

    @Override
    public String toString() {
        return "Post{" +
                "id=" + id +
                ", authorId=" + authorId +
                ", authorName='" + authorName + '\'' +
                ", title='" + title + '\'' +
                ", summary='" + summary + '\'' +
                ", content='" + content + '\'' +
                ", tagId='" + tags + '\'' +
                ", categoryId='" + category + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", status=" + status +
                ", iconLink='" + iconLink + '\'' +
                ", adminId=" + adminId +
                ", isPublic=" + isPublic +
                ", isOriginal=" + isOriginal +
                ", isOpenComment=" + isOpenComment +
                ", postSource=" + postSource +
                ", uuid='" + uuid + '\'' +
                ", readCount=" + readCount +
                ", commentCount=" + commentCount +
                ", link='" + link + '\'' +
                '}';
    }
}
